package cqrtplm.entity;

import cqrtplm.log.ObjectComparator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.List;

@Data
@Entity
@Table(name = "RT_CERT_FILED_PARTINFO")
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "零部件信息实体类")
public class RtCertFiledPartinfoDO {

    @Id
    @Column(name = "ID", length = 38, nullable = false)
    @ApiModelProperty(value = "主键ID，唯一标识零部件记录")
    private String id;

    @Column(name = "FILEDID", length = 38)
    @ApiModelProperty(value = "主表")
    private String filedId;

    @Column(name = "PARTNO", length = 50, nullable = false)
    @ApiModelProperty(value = "件号，零部件的唯一编号")
    private String partNo;

    @Column(name = "PARTTYPE", length = 50)
    @ApiModelProperty(value = "类型，补气阀氧传感器类型")
    private String partType;

    @Column(name = "PARTNAME", length = 100)
    @ApiModelProperty(value = "零部件名称")
    private String partName;

    @Column(name = "MANUFACTURER", length = 100)
    @ApiModelProperty(value = "生产厂家名称")
    private String manufacturer;

    @Column(name = "TRADEMARK", length = 100)
    @ApiModelProperty(value = "商标")
    private String trademark;

    @Column(name = "TERMINAL_TYPE", length = 50)
    @ApiModelProperty(value = "终端型号，所属机组终端的型号")
    private String terminalType;

    @Column(name = "SPECIFICATION", length = 100)
    @ApiModelProperty(value = "规格参数，零部件的技术规格")
    private String specification;

    @Column(name = "MATERIAL", length = 50)
    @ApiModelProperty(value = "材质，零部件的制作材料")
    private String material;

    @Column(name = "INSTALLATION_POSITION", length = 100)
    @ApiModelProperty(value = "安装位置，触媒氧传感器等安装位置")
    private String installationPosition;

    @Column(name = "DRAWINGNO", length = 100)
    @ApiModelProperty(value = "图纸编号")
    private String drawingNo;

    @Column(name = "DRAWINGFILE", length = 100)
    @ApiModelProperty(value = "图纸文件ID")
    private String drawingFile;

    @Column(name = "RELATED_PARTNO", length = 50)
    @ApiModelProperty(value = "关联件号，相关联的其他零部件编号")
    private String relatedPartNo;

    @Column(name = "CERTIFICATE_NUMBER", length = 50)
    @ApiModelProperty(value = "证书号")
    private String certificateNumber;

    @Column(name = "CATALYST_IS_TWC", length = 1)
    @ApiModelProperty(value = "是否为TWC三元催化器，1是，0否")
    private String catalystIsTwc;

    @Column(name = "CATALYST_PRECIOUS_METAL_NAME", length = 50)
    @ApiModelProperty(value = "贵金属名称")
    private String catalystPreciousMetalName;

    @Column(name = "CATALYST_PRECIOUS_METAL_RATIO", precision = 5, scale = 2)
    @ApiModelProperty(value = "贵金属比例")
    private Double catalystPreciousMetalRatio;

    @Column(name = "AIR_SUPPLY_SENSABLE_PARAMETERS", length = 200)
    @ApiModelProperty(value = "二次补气阀能感应的参数")
    private String airSupplySensableParameters;

    @Column(name = "AIR_SUPPLY_ADJUSTMENT_METHOD", length = 100)
    @ApiModelProperty(value = "二次补气阀调节方式")
    private String airSupplyAdjustmentMethod;

    @Column(name = "AIR_SUPPLY_POSITION", length = 100)
    @ApiModelProperty(value = "二次补气阀补气位置")
    private String airSupplyPosition;

    @Column(name = "ECU_FUEL_INJECTION_TYPE", length = 50)
    @ApiModelProperty(value = "燃油喷射方式")
    private String ecuFuelInjectionType;

    @Column(name = "ECU_FUEL_INJECTION_POSITION", length = 100)
    @ApiModelProperty(value = "燃油喷射位置")
    private String ecuFuelInjectionPosition;

    @Column(name = "ECU_FEEDBACK_CONTROL_DEVICE", length = 100)
    @ApiModelProperty(value = "反馈控制装置")
    private String ecuFeedbackControlDevice;

    @Column(name = "ALTITUDE", length = 20)
    @ApiModelProperty(value = "海拔")
    private String altitude;

    @Column(name = "IS_ENABLED", length = 1, nullable = false)
    @ApiModelProperty(value = "是否启用，1是，0否")
    private String isEnabled;

    @Column(name = "PARTCODE", length = 5)
    @ApiModelProperty(value = "品类")
    private String partCode;

    @Column(name = "MANUFACTURERID", length = 10)
    @ApiModelProperty(value = "厂家ID")
    private String manufacturerId;

    @Column(name = "TABLENAME", length = 255)
    @ApiModelProperty(value = "发电机蒸发/发动机蒸发/尾气")
    private String tableName;

    @Column(name = "CREATEUSERID", length = 100)
    @ApiModelProperty(value = "创建人ID")
    @ObjectComparator.RTIgnore
    private String createUserId;

    @Column(name = "CREATEUSERNAME", length = 100)
    @ApiModelProperty(value = "创建人")
    @ObjectComparator.RTIgnore
    private String createUserName;

    @Column(name = "CREATETIME")
    @ApiModelProperty(value = "创建时间")
    @ObjectComparator.RTIgnore
    private Timestamp createTime;

    @Column(name = "UPDATEUSERID", length = 100)
    @ApiModelProperty(value = "更新人ID")
    @ObjectComparator.RTIgnore
    private String updateUserId;

    @Column(name = "UPDATEUSERNAME", length = 100)
    @ApiModelProperty(value = "更新人")
    @ObjectComparator.RTIgnore
    private String updateUserName;

    @Column(name = "UPDATETIME")
    @ApiModelProperty(value = "更新时间")
    @ObjectComparator.RTIgnore
    private Timestamp updateTime;

    @Column(name = "APPENDIX_PRODUCT_INTERNAL_NO", length = 50)
    @ApiModelProperty(value = "附录产品内部编号 (主编号_内部编号）")
    private String appendixProductInternalNo;

    @Column(name = "APPENDIX_NO", length = 50)
    @ApiModelProperty(value = "附录编号")
    private String appendixNo;

    @Column(name = "INFO_PUBLIC_NO", length = 50)
    @ApiModelProperty(value = "信息公开编号")
    private String infoPublicNo;

    @Column(name = "ENVIRONMENTAL_INFO_LABEL_PASTE_POS", length = 50)
    @ApiModelProperty(value = "环保信息标签粘贴位置")
    private String environmentalInfoLabelPastePos;

    @Column(name = "ENTERPRISE_STANDARD", length = 50)
    @ApiModelProperty(value = "企业标准")
    private String enterpriseStandard;

    @Column(name = "OLDID", length = 50)
    @ApiModelProperty(value = "旧ID")
    private String oldId;

    @Column(name = "FORM_ID", length = 50)
    @ApiModelProperty(value = "表单ID")
    private String formId;

    @Column(name = "OA_TABLE", length = 255)
    @ApiModelProperty(value = "OA表名")
    private String oaTable;

    @Column(name = "MANUFACTURER_STR", length = 500)
    @ApiModelProperty(value = "原供应商信息")
    private String manufacturerStr;

    @Column(name = "CARBURETOR_ANTI_ADJUSTMENT_METHOD", length = 500)
    @ApiModelProperty(value = "化油器防调整方式")
    private String carburetorAntiAdjustmentMethod;

    @Column(name = "CARBURETOR_IDENTIFIER", length = 50)
    @ApiModelProperty(value = "化油器标识")
    private String carburetorIdentifier;

    @Column(name = "MANUFACTURER_IDENTIFIER", length = 50)
    @ApiModelProperty(value = "厂家标识")
    private String manufacturerIdentifier;

    @ApiModelProperty(value = "零件供应商")
    @Transient
    private List<RtCertFiledPartManufacturDO> manufacturerlist;

    @Column(name = "ATTACHSPECIFICATION", length = 100)
    private String attachSpecification;
}